--[[	$Id: caelMedia.lua 3450 2013-08-02 14:05:39Z sdkyron@gmail.com $	]]

local _, caelMedia = ...
_G["caelMedia"] = caelMedia

caelMedia.DIRECTORY = [=[Interface\Addons\caelMedia]=]

caelMedia.files = {
	bgFile					= [=[Interface\ChatFrame\ChatFrameBackground]=],
	edgeFile				= [=[Interface\Addons\caelMedia\borders\glowtex3]=],
	partyIcon				= [=[Interface\Addons\caelMedia\miscellaneous\partyicon]=],
	raidIcon				= [=[Interface\Addons\caelMedia\miscellaneous\raidicon]=],
	raidIcons				= [=[Interface\Addons\caelMedia\miscellaneous\raidicons]=],
	lfgIcons				= [=[Interface\Addons\caelMedia\miscellaneous\lfgicons]=],
	statusBarA				= [=[Interface\Addons\caelMedia\statusbars\normtexa]=],
	statusBarB				= [=[Interface\Addons\caelMedia\statusbars\normtexb]=],
	statusBarC				= [=[Interface\Addons\caelMedia\statusbars\normtexca]=],
	statusBarCb				= [=[Interface\Addons\caelMedia\statusbars\normtexcb]=],
	statusBarD				= [=[Interface\Addons\caelMedia\statusbars\normtexd]=],
	statusBarE				= [=[Interface\Addons\caelMedia\statusbars\normtexe]=],

	buttonNormal			= [=[Interface\AddOns\caelMedia\buttons\buttonnormal]=],
	buttonPushed			= [=[Interface\AddOns\caelMedia\buttons\buttonpushed]=],
	buttonChecked			= [=[Interface\AddOns\caelMedia\buttons\buttonchecked]=],
	buttonHighlight			= [=[Interface\AddOns\caelMedia\buttons\buttonhighlight]=],
	buttonFlash				= [=[Interface\AddOns\caelMedia\buttons\buttonflash]=],
	buttonBackdrop			= [=[Interface\AddOns\caelMedia\buttons\buttonbackdrop]=],
	buttonGloss				= [=[Interface\AddOns\caelMedia\buttons\buttongloss]=],

	soundAlarm				= [=[Interface\Addons\caelMedia\sounds\alarm.mp3]=],
	soundLeavingCombat		= [=[Interface\Addons\caelMedia\sounds\combat-.mp3]=],
	soundEnteringCombat		= [=[Interface\Addons\caelMedia\sounds\combat+.mp3]=],
	soundEnteringPvPZone	= [=[Interface\Addons\caelMedia\sounds\prepareforbattle.mp3]=],
	soundCombo				= [=[Interface\Addons\caelMedia\sounds\combo.mp3]=],
	soundComboMax			= [=[Interface\Addons\caelMedia\sounds\finish.mp3]=],
	soundGodlike			= [=[Interface\Addons\caelMedia\sounds\godlike.mp3]=],
	soundLnLProc			= [=[Interface\Addons\caelMedia\sounds\lnl.mp3]=],
	soundskillUp			= [=[Interface\Addons\caelMedia\sounds\skill up.mp3]=],
	soundWarning			= [=[Interface\Addons\caelMedia\sounds\warning.mp3]=],
	soundAggro				= [=[Interface\Addons\caelMedia\sounds\aggro.mp3]=],
	soundWhisper			= [=[Interface\Addons\caelMedia\sounds\whisper.mp3]=],
	soundFinish				= [=[Interface\Addons\caelMedia\sounds\execute.mp3]=],

	firstblood				= [=[Interface\Addons\caelMedia\sounds\kills\1_firstblood.mp3]=],
	doublekill				= [=[Interface\Addons\caelMedia\sounds\kills\2_doublekill.mp3]=],
	multikill				= [=[Interface\Addons\caelMedia\sounds\kills\3_multikill.mp3]=],
	dominating				= [=[Interface\Addons\caelMedia\sounds\kills\4_dominating.mp3]=],
	rampage					= [=[Interface\Addons\caelMedia\sounds\kills\5_rampage.mp3]=],
	megakill				= [=[Interface\Addons\caelMedia\sounds\kills\6_megakill.mp3]=],
	unstoppable				= [=[Interface\Addons\caelMedia\sounds\kills\7_unstoppable.mp3]=],
	ultrakill				= [=[Interface\Addons\caelMedia\sounds\kills\8_ultrakill.mp3]=],
	monsterkill				= [=[Interface\Addons\caelMedia\sounds\kills\9_monsterkill.mp3]=],
	godlike					= [=[Interface\Addons\caelMedia\sounds\kills\10_godlike.mp3]=],
}

--	caelMedia.fontObject = CreateFont("caelMediaFontObject")
--	caelMedia.fontObject:SetFont(caelMedia.files.fontRg, 10, nil)

caelMedia.insetTable = {
    left = caelLib.scale(2),
    right = caelLib.scale(2),
    top = caelLib.scale(2),
    bottom = caelLib.scale(2)
}

caelMedia.backdropTable = {
    bgFile   = caelMedia.files.bgFile,
    edgeFile = caelMedia.files.edgeFile,
    edgeSize = caelLib.scale(2),
    insets   = caelMedia.insetTable
}

caelMedia.borderTable = {
    bgFile   = nil,
    edgeFile = caelMedia.files.edgeFile,
    edgeSize = caelLib.scale(4),
    insets   = caelMedia.insetTable
}

caelMedia.createBackdrop = function(parent)
	local backdrop = CreateFrame("Frame", nil, parent)
	backdrop:SetPoint("TOPLEFT", caelLib.scale(-2.5), caelLib.scale(2.5))
	backdrop:SetPoint("BOTTOMRIGHT", caelLib.scale(2.5), caelLib.scale(-2.5))
	backdrop:SetFrameLevel(parent:GetFrameLevel() -1 > 0 and parent:GetFrameLevel() -1 or 0)
	backdrop:SetBackdrop(caelMedia.backdropTable)
	backdrop:SetBackdropColor(0, 0, 0, 0.5)
	backdrop:SetBackdropBorderColor(0, 0, 0, 1)
	return backdrop
end